package com.briup.jz.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.briup.jz.bean.AccountSystem;
import com.briup.jz.bean.AccountSystemExample;
import com.briup.jz.dao.AccountSystemMapper;
import com.briup.jz.service.IAccountSystemService;
@Service
public class AccountSystemImpl implements IAccountSystemService{
	@Autowired
	private AccountSystemMapper accountsystemmapper;

	/**
	 *
	 */
	@Override
	public List<AccountSystem> selectAll(AccountSystemExample accountsystemexample) {
		// TODO Auto-generated method stub
		return accountsystemmapper.selectByExample(accountsystemexample);
	}

	@Override
	public void saveOrUpdate(AccountSystem countsystem) {
		// TODO Auto-generated method stub
		if(countsystem.getId()!=null)
			accountsystemmapper.updateByPrimaryKey(countsystem);
		else {
			accountsystemmapper.insert(countsystem);
		}
	}

	@Override
	public void deleteById(Long id) {
		accountsystemmapper.deleteByPrimaryKey(id);
	}

	@Override
	public AccountSystem selectById(Long id) {
		// TODO Auto-generated method stub
		return accountsystemmapper.selectByPrimaryKey(id);
	}

}
